package com.song.dao;

import com.song.pojo.Menu;
import com.song.vo.MenuVo;

import java.util.List;

/**
 * @author 宋超
 * HP - the login name of the current user.
 * 2020/12/6 - the current system date.
 * 9:34 - the current system time.
 */
public interface MenuMapper {

    //查询所有菜单
    List<Menu> findMenuList();

    //根据角色ID查询该角色拥有的菜单ID集合
    List<Integer> findMenuIdListByRoleId(int roleId);

    //根据菜单编号查询菜单信息
    List<Menu> findMenuByMenuId(List<Integer> currentRoleMenuIds);


    //查询菜单列表
    List<Menu> findMenuListByPage(MenuVo menuVo);

    //添加菜单
    int addMenu(Menu menu);

    //修改菜单
    int updateMenu(Menu menu);

    //查询此菜单下是否有子菜单
    int getMenuCountByMenuId(Integer id);

    //删除菜单
    int deleteById(Integer id);

    //根据当前登录员工的角色查询菜单列表
    List<Menu> findListByEmployeeId(Integer employeeId);
}
